<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/hlht/openPrice.js"></script>
    <script type="text/javascript"
            src="http://webapi.amap.com/maps?v=1.3&key=311ba5c2313d5b0f7286b55ef7109e3a"></script>
    <script type="text/javascript" src="${ctx}/libjs/plugins/bootstrap/js/bootstrap.AMapPositionPicker.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>开放站点</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>推送价格设置</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">推送价格设置</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                    <div class="pull-center col-md-2">
                        <button type="button" class="btn btn-primary"
                                onclick="openPrice.updateHlhtTenantOpenPriceForOpenStation()">一键调整
                        </button>

                    </div>
                    <%--<span>推送价格说明：针对站点原始电价的服务费进行调整。如某站某时段的原始服务费为0.6元/度，调整服务费为0.1，则调整后的互联服务费是0.7元/度。以该互联服务费+原基本电价作为推送价格给到互联方。</span>--%>
                </div>

                <div class="ibox-content">
                    <input type="hidden" class="form-control" id="tenantOpenId" name="tenantOpenId"  value="${tenantOpenId}">
                    <input type="hidden" class="form-control" id="elecStationId" name="elecStationId"  value="${elecStationId}">
                        <form class="form-horizontal m-t" style="margin-top: 15px" id="frmHlhtTenantOpenStationPriceVo">
                            <c:forEach items="${elecStationPriceList}" var="elecStationPrice">
                                <fieldset class="layui-elem-field col-sm-9 elecStationPrice" value="${elecStationPrice.priceId}"   style="margin: 0 auto">
                                    <input type="hidden" class="form-control" id="openPriceId" name="openPriceId"  value="${elecStationPrice.openPriceId}">
                                    <div class="layui-field-box">
                                        <div class="form-group row">
                                            <label class="col-sm-1 col-form-label text-left">原始价格</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" name="openPriceBeginTime"  value="${elecStationPrice.openPriceBeginTime}">
                                            </div>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" name="openPriceEndTime"  value="${elecStationPrice.openPriceEndTime}" >
                                            </div>
                                            <label class="col-sm-2 col-form-label text-right">基本电价：</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" name="elecPrice"  value="${elecStationPrice.elecPrice}" >
                                            </div>
                                            <label class="col-sm-1 col-form-label text-left">服务费：</label>
                                            <div class="col-sm-2">
                                                <input type="text" class="form-control" name="servicePrice"  value="${elecStationPrice.servicePrice}" >
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <label class="col-sm-2 col-form-label text-left">互联价格调整</label>
                                                <label class="col-sm-1 col-form-label text-left">调整价：</label>
                                                <div class="col-sm-2">
                                                    <input type="text" class="form-control" name="openPriceAdjustValue"  value="${elecStationPrice.openPriceAdjustValue}" >
                                                </div>
                                                <label class="col-sm-1 col-form-label text-left">元/度</label>
                                                <label class="col-sm-2 col-form-label text-right">互联服务费：</label>
                                                <div class="col-sm-2">
                                                    <input type="text" class="form-control" name="total"  value="${elecStationPrice.servicePrice + elecStationPrice.openPriceAdjustValue}" >
                                                </div>
                                        </div>
                                    </div>
                                </fieldset>
                            </c:forEach>
                        </form>
                        <div class="form-group" style="margin-top: 15px !important;">
                            <div class="col-sm-4 col-sm-offset-8 text-right">
                                <button type="button" class="btn btn-success" onclick="openPrice.save()">提交</button>
                            </div>
                        </div>


                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
</script>
</body>
</html>
